<template>
  <div>
    <h1>请选择你喜欢的专栏</h1>
    <span v-for="val in arr" :key="val" >
      <input type="checkbox"  :value="val" v-model="item" /> {{ val }}
    </span>
    <ul>
        <li v-for="item in item" :key="item" > {{item}} </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "Task2",
  data() {
    return {
      arr: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      item:[],
    };
  },
};
</script>

<style scoped>
</style>